package com.linsir.saas;

import com.linsir.core.launch.LinsirApplication;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;

import java.util.Iterator;

/**
 * @author yuxiaolin
 * @title: SaaSApplication
 * @projectName linsir
 * @description: saas 服务启动
 * @date 2022/2/10 12:14 上午
 */

@SpringBootApplication
@EnableDiscoveryClient
public class SaaSApplication {

    public static void main( String[] args )
    {

        LinsirApplication.run("linsir-saas-server", SaaSApplication.class,args);

        /*SpringApplication springApplication =new SpringApplication(SaaSApplication.class);*/

        /*ConfigurableApplicationContext configurableApplicationContext=*/

        //SpringApplication.run(LinWebApplication.class);

       /* ConfigurableListableBeanFactory configurableListableBeanFactory = configurableApplicationContext.getBeanFactory();

        Iterator<String> beans=  configurableListableBeanFactory.getBeanNamesIterator();

        PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();

        System.out.println(passwordEncoder.encode("123456"));

        for (Iterator<String> it = beans; it.hasNext(); ) {
            String bean = it.next();

            System.out.println(bean);
        }*/
    }
}
